<%@ taglib prefix="c" uri="http://java.sun.com/jsp/jstl/core" %>
<%@ page language="java" contentType="text/html; charset=UTF-8"
         pageEncoding="UTF-8"%>
<%@include file="/WEB-INF/jsp/common/head.jsp"%>
<div class="right">
    <div class="location">
        <strong>当前位置:</strong>
        <span>入库记录管理页面</span>
    </div>
    <form action="${pageContext.request.contextPath}/srd/list">
       商品名称：<input type="text" name="goodsName">
        <input	value="查 询" type="submit">
    </form>
    <a href="${pageContext.request.contextPath}/srd/toAdd"><button>添加</button></a>
    <table border="1">
        <tr>
            <th>入库编号</th>
            <th>商品名称</th>
            <th>金额</th>
            <th>供货商</th>
            <th>付款状态</th>
            <th>创建时间</th>
            <th>操作</th>
        </tr>
        <c:forEach items="${list}" var="s">
            <tr>
                <td>${s.srCode}</td>
                <td>${s.goodsName}</td>
                <td>${s.totalAmount}</td>
                <td>${s.supName}</td>
                <td>${s.payStatus==1?'未支付':'已支付'}</td>
                <td>${s.createdTime}</td>
                <td>
                    <a href="${pageContext.request.contextPath}/srd/selectId?id=${s.id}"><img src="${pageContext.request.contextPath }/statics/images/view.png"/></a>
                    <a href="${pageContext.request.contextPath}/srd/toUpdate?id=${s.id}"><img src="${pageContext.request.contextPath }/statics/images/upd.png"/></a>
                    <a href="${pageContext.request.contextPath}/srd//delete?id=${s.id}"><img src="${pageContext.request.contextPath}/statics/images/del.png"/></a>
                </td>
            </tr>
        </c:forEach>
    </table>
    共${pageCount}条记录
    <a href="${pageContext.request.contextPath}/srd/list?pageNo=${param.pageNo-1}">上一页</a>
    <a href="${pageContext.request.contextPath}/srd/list?pageNo=${param.pageNo+1}">下一页</a>
    当前是第${param.pageNo}页
</div>

<%@include file="/WEB-INF/jsp/common/foot.jsp" %>
